package com.File;

import java.io.File;
import java.io.IOException;

public class Main39 {
    public static void main(String[] args){
        try {
            File file = new File("D:\\test\\test.txt");
            if (file.createNewFile()) {
                System.out.println("文件创建成功");
            } else {
                System.out.println("文件已经存在");
            }
        }
            catch(IOException ioe){
                ioe.printStackTrace();
            }
        }
    }

